package com.gushuang.oj.judge.codesandbox;

import com.gushuang.oj.judge.codesandbox.model.ExcuteCodeRequest;
import com.gushuang.oj.judge.codesandbox.model.ExcuteCodeResponse;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import sun.rmi.runtime.Log;

/**
 * @author 孤霜
 * @version 1.0
 */
@Slf4j
@AllArgsConstructor
public class CodeSandboxProxy implements CodeSandbox {

    private final CodeSandbox codeSandbox;


    @Override
    public ExcuteCodeResponse executeCode(ExcuteCodeRequest excuteCodeRequest) {
        log.info("代码沙箱请求信息" + excuteCodeRequest.toString());
        ExcuteCodeResponse excuteCodeResponse = codeSandbox.executeCode(excuteCodeRequest);
        log.info("代码沙箱响应信息"+  excuteCodeResponse.toString());
        return excuteCodeResponse;
    }
}
